package com.example.smart.ui.m

import com.example.lib.extend.gridManager
import com.example.lib.extend.setOnDoubleClickListener
import com.example.lib.utils.statusbar.StatusBarUtils
import com.example.smart.R
import com.example.smart.adapter.home.MVaccinesAdapter
import com.example.smart.base.ui.activity.BaseActivity
import com.example.smart.databinding.ActivityVaccinesListMBinding
import com.example.smart.utils.DisplayUtils

class MVaccinesListActivity : BaseActivity<ActivityVaccinesListMBinding>() {

    private val mAdapter by lazy {
        MVaccinesAdapter(this@MVaccinesListActivity)
    }

    override fun layoutID() = R.layout.activity_vaccines_list_m

    override fun initView() {
        StatusBarUtils.setStateAndNavigationBar(this@MVaccinesListActivity,
            statusBarColor = com.example.lib.R.color.translate)
        binding.TopRecycler.gridManager(3)
        binding.TopRecycler.adapter = mAdapter
        binding.BottomRecycler.gridManager(3)
        binding.BottomRecycler.adapter = mAdapter
    }

    override fun initListener() {
        binding.Search.setOnDoubleClickListener {
            DisplayUtils.toSearch(this@MVaccinesListActivity)
        }
    }
}